 <html>
 <%@ page import="java.sql.*" %>
 <body bgcolor="#fdfec5">
  	<img src="images/11.jpeg" height=200 width=300 /><img src="images/12.jpeg" height=200 width=300 /><img src="images/9.jpeg" height=200 width=300 />

<%!
ResultSet rs,rs1=null;
Connection con,con1=null;
 Statement st,st1;
 int toamount,famount;
 %>
<%
try
{
int faccno=Integer.parseInt(request.getParameter("faccno"));
 System.out.println(faccno);
int taccno=Integer.parseInt(request.getParameter("taccno"));
 System.out.println(taccno);
int event=Integer.parseInt(request.getParameter("event"));

  Class.forName("oracle.jdbc.driver.OracleDriver");
   Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","bank","bank");
  Statement st=con.createStatement();
  Statement st1=con.createStatement();
  rs=st.executeQuery("select amount from accountdetails where accno="+taccno+"");
  if(rs.next())
  {
    toamount=rs.getInt("amount");
    
 System.out.println(toamount);
}
  rs=st1.executeQuery("select amount from accountdetails where accno="+faccno+"");
 if(rs.next())
  {
   famount=rs.getInt("amount");
   rs.close();
  
  System.out.println(famount);
 }
  
  
  int total=0,bal=0;
 
  
  System.out.println(toamount);
  total=toamount+famount;
  System.out.println(total);
  bal=famount-famount;
  System.out.println(bal);
  st.executeUpdate("update accountdetails set amount='"+total+"' where accno='"+taccno+"' ");
  int i=st1.executeUpdate("update accountdetails set amount='"+bal+"' where accno='"+faccno+"' ");
  if(i>0)
  {
  System.out.println("changed");
   %>
   <div id="text14" style="position:absolute; overflow:hidden; left:500px; top:350px; width:550px; height:20px; z-index:19">
<div class="wpmd">
<div> <marquee align="left"><font size="4" color="green"><B><a href="feedback.jsp?tc=<%=taccno %>"> Transfer Funds Module Comlepted</a></B></font></marquee></div>
</div></div>
<%  }

}
catch(Exception e){}

 %>
 
 </body>
</html>